<?php
/**
 * @page installation Installation
 * 
 * Installation is pretty straight forward. Here are the steps you need to follow:
 * 
 * @attention If you are installing this script on a sub-directory like:
 * www.yoursite.com/reviews Please follow this section, @ref Installing-under-sub-directory, before continuing with these steps. 
 * 
 * @section server_requirements Server Requirements
 * 
 * Before proceeding make sure your server supports following configuration:
 * 
 * @li MySQL (version 4 or above)
 * @li PHP (version 5 or above)
 * @li Ioncube Loaders
 * @li Apache Mod_Rewrite Enabled
 * @li Support for cron jobs
 * @li PHP GD Library enabled
 * 
 * @section obtaining_license Obtaining License
 * 
 * You will receive license automatically via email right after the purchase. In case you have not, goto 
 * <a href="http://clients.gigapromoters.com/">our customer portal</a>, login to your account and you will see the
 * licenses link. After you have the license key, create a file license.txt in directory where you uploaded the
 * script. Paste license key in the file and save it.
 * 
 * In case you're unable to access the URL, please contact our support department.
 * 
 *  @section installation_process Installation Process
 * 
 * <ol>
 * <li>Upload the script to your web host inside your 'public_html' or 'www' folder.</li>
 * <li>CHMOD 777 to following directories:
 * 
 * /app/tmp and all directories present inside it.
 * /app/config
 * /app/webroot/uploads
 * /app/views/pages
 * app/locale</li>
 * <li>Create a MySQL database from your website control panel.</li>
 * <li>Try accessing your domain from browser, and you will be redirected to installation process which will ask you to provide database details and other configurations.</li>
 * <li>Once settings are submitted, installer will import necessary data in your database and create necessary configuration files. </li>
 * <li>You can open your domain in browser and you should see the website running now.
 * Homepage: www.yoursite.com
 * Admin Panel: www.yoursite.com/admin</li>
 * <li>If you intent to use newsletter feature, you will also need to do the following
 * <ol>
 * <li>Create cronjob and set it up to run every 6 hours:
 * <your_file_path>/cake/console/cake -app <your_file_path>/app master</li>
 * <li>CHMOD 755 cake/console/cake file(please note, change permission of cake file, not cake.bat or cake.php)</li>
 *</ol> </ol>
 *
 * @section post_installation Post-Installation
 * Go to app/config/ folder, and rename core.php to anything and after that rename core.productin file to core.php
 * 
 * @section Installing-under-sub-directory Installing under sub-directory
 * 
 * You need to follow this section only if you are installing this script under any sub-directory. For eg: www.yoursite.com/reviews
 * 
 * Here are some changes you need to do:
 * 
 * 1. Edit .htaccess of main folder, and locate following line:
 * 
 * @code
 * RewriteBase /
 * @endcode
 * 
 * %Comment this line, by adding # character in front of it, so changed line will look like:
 * 
 * @code
 * #RewriteBase /
 * @endcode
 * 
 * 2. Similarly edit .htaccess of /app/webroot folder, and locate:
 * 
 * @code
 * RewriteBase /app/webroot
 * @endcode
 * 
 * Then change it to:
 * 
 * @code
 * #RewriteBase /app/webroot
 * @endcode
 *
 */
/**
 * @page configuration Configuration
 * 
 * There are various configurations which you might want to customize as per your needs. 
 * Following are the groups in which configuration is divided:
 * 
 * @li @subpage backend_config
 * @li @subpage general_config
 * @li @subpage listing_config
 * @li @subpage review_config
 * @li @subpage newsletter_config
 * 
 * 
 */

 /* $Id$
 * 
 * This file can not be redistributed to anyone without the permission of Giga Promoters
 * Copyright 2005 - 2008, Giga Promoters
 * 						  608 Aggarwal Cyber Plaza
 *						  Netaji Subhash Place, Delhi - 110034
 *						  www.gigapromoters.com
 * 
 *
 * @version 			$Rev$
 * @lastModifiedBy		$LastChangedBy$
 * @lastChanged			$Date$
 * @copyright 			Giga Promoters (www.gigapromoters.com)
 * 
 */

Configure::write('Config.editable', true);

Configure::write('Config.dbDump', APP.'config'.DS.'sql'.DS.'schema.php');
// shift installation code here from config hooks file

// SaaS support
callHooks('beforeConfig');

if(!defined('CONFIG_FILE'))
{
	define('CONFIG_FILE', APP.'config'.DS.'config.php');
	define('PARENT_CONFIG_IN_USE', 1);
}

define('CONFIG_KEYS_CACHE_FILE', 'config_keys');

// read from configuration file, and set it in memory

if(is_file(CONFIG_FILE))
{
	require_once(CONFIG_FILE);
	Configure::write('cmsConfig', $config);
	unset($config);
}

callHooks('afterConfig');
?>